import request from '@/utils/request'

// 查询每日采购价记录列表
export function listPrice(query) {
  return request({
    url: '/purchase/price/list',
    method: 'get',
    params: query
  })
}

// 查询每日采购价记录详细
export function getPrice(recordId) {
  return request({
    url: '/purchase/price/' + recordId,
    method: 'get'
  })
}

// 新增每日采购价记录

export function addPrice(data) {
  return request({
    url: '/purchase/price',
    method: 'post',
    data: data
  })
}

// 修改每日采购价记录

export function updatePrice(data) {
  return request({
    url: '/purchase/price',
    method: 'put',
    data: data
  })
}

// 删除每日采购价记录

export function delPrice(recordId) {
  return request({
    url: '/purchase/price/' + recordId,
    method: 'delete'
  })
}
